﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;
using Interfaces;

namespace Scheduling
{
    [DataContract]
    public class Operation : IOperation
    {
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public ITimeSpec Years { get; set; }
        [DataMember]
        public ITimeSpec Months { get; set; }
        [DataMember]
        public ITimeSpec DaysOfYear { get; set; }
        [DataMember]
        public ITimeSpec DaysOfMonth { get; set; }
        [DataMember]
        public ITimeSpec DaysOfWeek { get; set; }
        [DataMember]
        public ITimeSpec Hours { get; set; }
        [DataMember]
        public ITimeSpec Minutes { get; set; }

        [DataMember]
        public List<ICommand> Commands { get; set; }

        public Operation()
        {
            Commands = new List<ICommand>();
        }
    }

    public enum Month : short
    {
        January = 2,
        February = 4,
        March = 8,
        April = 16,
        May = 32,
        June = 64,
        July = 128,
        August = 256,
        September = 512,
        October = 1024,
        November = 2048,
        December = 4096
    }
}
